package cylons;

public class Move {
	public static enum Mode { TARGET, HUNT }
	private int row, col;
    private Mode mode;

	public Move(int row, int col, Mode mode) {
		this.row = row;
		this.col = col;
        this.mode = mode;
	}
	
	public int getRow() {
		return row;
	}
	
	public int getColumn() {
		return col;
	}

    public Mode getMode() { return mode; }

    public String toString() {
        return String.format("Row %d, Col %d, Mode %s", row, col, mode);
    }

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		Move move = (Move) o;

		if (col != move.col) return false;
		if (row != move.row) return false;

		return true;
	}

	@Override
	public int hashCode() {
		int result = row;
		result = 31 * result + col;
		return result;
	}
}
